<template>
  <el-row class="translatePageRowClass">
    <el-col :span="24" class="translatePageColClass"
      ><div class="grid-content bg-purple-dark">
        <el-menu
          :default-active="activeIndex2"
          class="el-menu-demo"
          mode="horizontal"
          @select="toTranslatePage"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
        >
          <el-menu-item index="1">转换页面</el-menu-item>
          <el-menu-item index="2">我的</el-menu-item>
        </el-menu>
        <router-view></router-view></div
    ></el-col>
  </el-row>
</template>
<script>
export default {
  components: {},
  props: [],
  data() {
    return {
      activeIndex2: "1",
    };
  },
  computed: {},
  watch: {},
  created() {
    if (this.activeIndex2 == "1") {
      this.$router.push({ name: "DoTranslatePage" });
    }
  },
  mounted() {
  },
  methods: {
    toTranslatePage(key, keyPath) {
      console.log(key);
      if (key == 1) {
        this.$router.push({ name: "DoTranslatePage" });
      }
      if (key == 2) {
        this.$router.push({ name: "MyInfo" });
      }
    },
  },
};
</script>
<style>
.translatePageRowClass {
  text-align: center;
  height: 100%;
  width: 70%;
  margin-left: 15%;
}
.translatePageColClass {
  height: 100%;
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
  min-height: 100%;
}
.grid-content {
  border-radius: 4px;
  min-height: 100%;
}
</style>
